<template>
  <van-tabbar v-model="active" active-color="blue" inactive-color="#000" :placeholder=true>
    <van-tabbar-item  icon="wap-home-o">首页</van-tabbar-item>
        <van-tabbar-item @click="fun" :to="'/classify'" icon="apps-o">分类</van-tabbar-item>
        <van-tabbar-item icon="browsing-history-o">发现</van-tabbar-item>
        <van-tabbar-item icon="shopping-cart-o">购物车</van-tabbar-item>
        <van-tabbar-item @clic='fun1' :to="'/my'" icon="user-o">我的</van-tabbar-item>
</van-tabbar>
</template>

<script>
import Vue from 'vue';
import { Tabbar, TabbarItem } from 'vant';

Vue.use(Tabbar);
Vue.use(TabbarItem);
export default {
    data(){
        return{
            active:0
        }
    },
    methods:{
        fun(){
            window.scrollTo({left:0,top:0})
        },
        fun1(){
            window.scrollTo({left:0,top:0})
        }
    }
}
</script>

<style>

</style>